package se.webbzon.boltzmann.editor.component.characterlist;

import java.util.Map.Entry;

import se.webbzon.boltzmann.game.character.AbstractCharacterTextureSet;

public class CharacterEntry implements Comparable<CharacterEntry> {
	
	// The key to this character entry
	private final String key;
	
	// The value of this character entry
	private final AbstractCharacterTextureSet value;
	
	/*============================================================
	Constructors
	============================================================*/
	
	public CharacterEntry(Entry<String,AbstractCharacterTextureSet> characterEntry) {
		key = characterEntry.getKey();
		value = characterEntry.getValue();
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the name of the character texture set associated with this entry. **/
	public String getCharacterTextureSetName() {
		return key;
	}
	
	/** Returns the character texture set associated with this entry. **/
	public AbstractCharacterTextureSet getCharacterTextureSet() {
		return value;
	}

	@Override public int compareTo(CharacterEntry other) {
		return key.compareTo(other.key);
	}
	
}
